Simple Game

By Mamadou Bah · 14 views · 0 likes · Jul 6, 2026

This sketch fills the screen with a grid of white circles that pulse in size like a slow-moving wave, thanks to a sine function tied to frameCount. Keyboard controls let you adjust the grid spacing, animation speed, and pulse size live, with a semi-transparent black background creating soft motion trails.

🔀 Remix This 📖 View Docs ⛶ Full Screen ← Back to Gallery

💬 Comments

Loading comments...

📋 Embed Code

Copy this code to embed this sketch on your website:

<iframe src="https://p5js.ai/embed/092b1a51-168b-496a-ba8f-a7e7fc6f85e9" width="400" height="400" frameborder="0" allow="autoplay" title="Simple Game"></iframe>

Adjust width and height as needed. Preview embed →

❓ About This Sketch 4 questions

What does this p5.js sketch create visually?

This sketch creates a visually appealing grid of circles that animate with a wave-like pattern. The circles change size over time, creating a dynamic effect as they fade out, resulting in a smooth trailing visual.

How can users interact with this p5.js sketch?

This sketch is not directly interactive; instead, it drives animation through the use of the frameCount variable, which updates continuously to create movement. Users can modify parameters like spacing and size to influence the visual output.

What creative coding technique does this p5.js sketch demonstrate?

This sketch demonstrates the use of sine waves for animation, creating a rhythmic fluctuation in the size of circles. It effectively utilizes mathematical functions to generate smooth and visually engaging animations.

How can I recreate a similar wave effect in p5.js?

To recreate a similar wave effect in p5.js, you can use the sine function in combination with frameCount to vary the size of shapes over time. By adjusting parameters such as spacing and animation speed, you can achieve dynamic visual patterns.

🎬 Video Preview